<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: register.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."register.php";
include LOCALE.LOCALESET."user_fields.php";

$avloserid=$_GET['avloserid'];
$db = mysql_connect($GLOBALS['db_host'], $GLOBALS['db_user'], $GLOBALS['db_password']);
mysql_select_db($GLOBALS['db_name'], $db); 

$query=" SELECT * FROM avloser WHERE avloserid='$avloserid'";
$result=mysql_query($query);
$num1=mysql_numrows($result);

$i=0;
while ($i < $num1) {
$fornavn=mysql_result($result,$i,"fornavn");
$etternavn=mysql_result($result,$i,"etternavn");
++$i;
}

$query=" SELECT avloserid FROM avloser WHERE avloserid='$avloserid'";
$result=mysql_query($query);
$num=mysql_numrows($result);

$i=0;
while ($i < $num) {
$avloserid=mysql_result($result,$i,"avloserid");
++$i;
}

echo "

	<br></br>
	<table class='capmain' border='0' cellpadding='0' align='center' width='608px'>
		<tr>
			<th><font style='text-transform: capitalize;'>Dokumenter for $fornavn  $etternavn </font></th>
		</tr>
	</table>

	<form method='post' action='process.php' enctype='multipart/form-data'>
	<input type='hidden' name='ud_avloserid' value=$avloserid>
	<input type='hidden' name='avloserid' value='$avloserid' maxlength='30' style='width:200px;' />
	

	<table class='imagetable' cellpadding='0' cellspacing='0' align='center'>
	
		<tr>
			<th>Filnavn:</th>			<td><input type='text' name='filnavn' maxlength='70' style='width:200px;' /></td>
                    
		</tr>
		
		<tr>
			<th>Last opp:</th>		<td><input type='file' name='image' />
                    
		</tr>
		

		<tr>
			<th><input type='submit' value='Last Opp' /></th>
			<td></td>
</table><br></br>";

require_once THEMES."templates/footer.php";
?>